﻿using Easy.Cloud.Communication.Sms.Ali.Options;
using Easy.Cloud.Communication.Sms.Core;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Linq;

namespace Easy.Cloud.Communication.Sms.Ali
{
    public class AliSmsOptionsExtension : ISmsOptionsExtension
    {
        private readonly AliOptions _aliOption;

        public AliSmsOptionsExtension(AliOptions option)
        {
            this._aliOption = option;
        }

        public void AddServices(IServiceCollection services)
        {
            services.AddSingleton(__ => _aliOption);

            services.AddScoped<ISmsClient, AliSmsClient>();

            services.AddScoped<AliSmsClient>();
        }
    }
}